package com.zhl.media.app.mvp.model;

import android.app.Application;

import com.google.gson.Gson;
import com.jess.arms.di.scope.ActivityScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;
import com.zhl.media.app.mvp.contract.PreviewContract;

import javax.inject.Inject;


@ActivityScope
public class PreviewModel extends BaseModel implements PreviewContract.Model {
    @Inject
    Gson mGson;
    @Inject
    Application mApplication;

    @Inject
    public PreviewModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        this.mGson = null;
        this.mApplication = null;
    }

//    @Override
//    public Observable<BaseRespose<String>> saveResultNotFile(Map map) {
//        String route = new Gson().toJson(map);
//        RequestBody jsonData = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), route);
//        return mRepositoryManager.obtainRetrofitService(AppService.class).saveResultNotFile(jsonData);
//    }
//
//    @Override
//    public Observable<BaseRespose<String>> updateResultNotFile(Map map) {
//        String route = new Gson().toJson(map);
//        RequestBody jsonData = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), route);
//        return mRepositoryManager.obtainRetrofitService(AppService.class).updateResultNotFile(jsonData);
//    }

}